home *** CD-ROM | disk | FTP | other *** search
Text File | 1994-03-13 | 2.0 KB | 86 lines | [TEXT/MPS ] |
- // Copyright ©1994 Apple Computer, Inc.
- // Author: John Powers
- // Date: 04-Aug-93
-
- // UDoc.h
- // Header for document, art, and related classes.
-
- #ifndef __UDOC__
- #define __UDOC__ // #endif __UDOC__ is at end of this file
-
- // Most of the includes are covered in UApp.h
-
- #include <Windows.h>
-
- #ifndef __UAPP__
- #include "UApp.h"
- #endif
-
- // Constants (also see UAppShared.h).
- // ------------------------------------------------------------------------
-
- #define override virtual
-
- // Forward references
- // ------------------------------------------------------------------------
-
- class TScrap;
- class TApp;
-
- // ------------------------------------------------------------------------
- // A base class our window classes.
- // Manages everything inside the window.
- //
-
- class TDoc : public TDocument
- {
- private:
- protected:
- TApp* fApp; // The application collaborator.
- enum
- { // ADB key codes for TDoc::IsThisKeyDown()
- kCommandKey = 0x37,
- kShiftKey = 0x38,
- kCapsLockKey = 0x39,
- kOptionKey = 0x3A,
- kControlKey = 0x3B
- };
- virtual Boolean IsThisKeyDown(const short theKey);
- public:
- // Constructor and destructor
- TDoc(short resID);
- virtual ~TDoc();
- // Overrides from TDocument
- override void DoContent(EventRecord* /*pEvent*/) {;}
- override void DoUpdate();
- // New functions
- virtual void Erase();
- virtual void Hide();
- virtual void Invalidate();
- virtual Boolean IsWindowVisible();
- virtual void SetApp(TApp* theApp) {this->fApp = theApp;}
- virtual void Show();
- virtual void Toggle();
- // Functions to override
- virtual void DoIdle() {;}
- virtual void Draw() {;}
- };
-
- // ------------------------------------------------------------------------
- // A class for the clipboard window.
- // Manages everything inside the window.
- class TDocClip : public TDoc
- {
- private:
- TScrap* fScrap; // The scrap collaborator.
- protected:
- public:
- // Constructor
- TDocClip(short resID);
- // Overrides
- override void Draw();
- // New functions
- virtual void SetScrapObj(TScrap* scrapObj) {this->fScrap=scrapObj;}
- };
-
- #endif __UDOC__